CHOWN

Section: MINTLIB LIBRARY FUNCTIONS (3)
Updated: 3 March 1993
Index Return to Main Contents
 

NAME

chown - change owner and group of a file  

SYNOPSIS

#include <unistd.h>

int chown(const char *path, int uid, int gid);
 

DESCRIPTION

path points to a path naming a file. The owner ID and group ID of the file are set to the numeric values contained in uid and gid respectively. Only a process with effective uid 0 or whose effective uid matches the user ownership of the file may make this call. In the latter case, the new uid must match the old one, and the calling process must also be a member of the group specified by gid.  

RETURN VALUES


 0 on success -1 on failure; errno is set to indicate the error  

SEE ALSO

chmod(3), Fchown(2)  

NOTES

When MiNT is not active, this routine is bogus. MS-DOS (TOS) file systems do not understand file ownership.
 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUES
SEE ALSO
NOTES

This document was created by man2html, using the manual pages.
Time: 11:14:47 GMT, June 22, 2025